/**
 * gulp工具集操作im自动化
 * by blue
 */
var gulp = require("gulp"),
    uglify = require("gulp-uglify"),
    concat = require('gulp-concat'),
    del = require("del");

gulp.task("del", function () {
    return del("build");
});

gulp.task("uglify2", ["del"], function () {
    return gulp.src(["scripts/**/*.js", "!scripts/lib/jquery/1.11.2/jquery__.js", "!scripts/im2.0.0.js", "!im2/scripts/util/drag.js"])
        .pipe(uglify({
            mangle: true,
            output: {ascii_only: true}
        }))
        .pipe(concat("im2.0.x.js", {newLine: ';'}))
        .pipe(gulp.dest('build'));
});

gulp.task('default', ["uglify2"]);
